package com.fmyexample.v2mcsecuritybootjdbc.modular.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.sql.Blob;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author ms
 * @since 2020-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_login_token")
public class LoginToken implements Serializable {

private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String userId;

    private String userKey;

    private Long tokenExpire;

    private String token;

    private String refreshToken;

    private Long refreshTokenExpire;

    private LocalDateTime createTime;

    private LocalDateTime expireTime;

    private LocalDateTime refreshExpireTime;

    private String client;

    private String type;

    private String timeUnit;

    private Blob info;


    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String USER_KEY = "user_key";

    public static final String TOKEN_EXPIRE = "token_expire";

    public static final String TOKEN = "token";

    public static final String REFRESH_TOKEN = "refresh_token";

    public static final String REFRESH_TOKEN_EXPIRE = "refresh_token_expire";

    public static final String CREATE_TIME = "create_time";

    public static final String EXPIRE_TIME = "expire_time";

    public static final String REFRESH_EXPIRE_TIME = "refresh_expire_time";

    public static final String CLIENT = "client";

    public static final String TYPE = "type";

    public static final String TIME_UNIT = "time_unit";

    public static final String INFO = "info";

}
